Skip to content

Fix chemistry‑related bugs #829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 21, 2025
Merged

Conversation

DimAdam-01
Copy link
Contributor

Description

  1. Integrate the new Pyrometheus branch to calculate transport coefficients,
    resolve the issue that prevented multi‑rank execution when using non‑hardcoded initial conditions;
    and fix minor bugs in both the inline Riemann solver and the HLL Riemann solver.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Scope

  • This PR comprises a set of related changes with a common goal

How Has This Been Tested?

  • Test A: 1D_reactive_shocktube
    Run the 1D shocktube reaction case, compared the result and they had the exact match,

Test Configuration:

  • What computers and compilers did you use to test this:

Run on Delta and Delta AI ( A100 and GH GPUs), as well as on my personal laptop

Checklist

  • I have added comments for the new code
  • I added Doxygen docstrings to the new code
  • I have made corresponding changes to the documentation (docs/)
  • I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
  • I have added example cases in examples/ that demonstrate my new feature performing as expected.
    They run to completion and demonstrate "interesting physics"
  • I ran ./mfc.sh format before committing my code
  • New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
  • This PR does not introduce any repeated code (it follows the DRY principle)
  • I cannot think of a way to condense this code and reduce any introduced additional line count

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

  • Checked that the code compiles using NVHPC compilers
  • Checked that the code compiles using CRAY compilers
  • Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
  • Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
  • Enclosed the new feature via nvtx ranges so that they can be identified in profiles
  • Ran a Nsight Systems profile using ./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR
  • Ran an Omniperf profile using ./mfc.sh run XXXX --gpu -t simulation --omniperf, and have attached the output file and plain text results to this PR.
  • Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature

@DimAdam-01 DimAdam-01 requested review from a team as code owners May 6, 2025 19:48
@sbryngelson
Copy link
Member

has the code that automatically turns a 1D case into an extrapolated 2D one been put into MFC? @DimAdam-01

@DimAdam-01
Copy link
Contributor Author

I consider it a distinct feature that I intended to add separately, but I can include it in this pull request. @sbryngelson

Copy link

codecov bot commented May 6, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 43.34%. Comparing base (40164cf) to head (e024c03).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/common/m_chemistry.fpp 0.00% 1 Missing ⚠️
src/simulation/m_riemann_solvers.fpp 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #829      +/-   ##
==========================================
+ Coverage   43.15%   43.34%   +0.18%     
==========================================
  Files          68       68              
  Lines       20262    20128     -134     
  Branches     2424     2400      -24     
==========================================
- Hits         8745     8725      -20     
+ Misses      10054     9934     -120     
- Partials     1463     1469       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

"cantera==3.0.1",
"pyrometheus==1.0.2"
"cantera==3.1.0",
"pyrometheus@git+https://github.com/pyrometheus/pyrometheus.git@main"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DimAdam-01 I think it would be preferable to reference an official (versioned) release of Pyro instead of referencing the main branch. You can see the original code referenced the 1.0.2 release on Pypi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DimAdam-01 i just created a new pyro release 1.0.3 (not sure if it's on pypi just yet)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it, it's not on pypi yet: (ERROR: No matching distribution found for pyrometheus==1.0.3)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i created it 3 min ago

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can change to pyrometheus==1.0.3 now

@sbryngelson sbryngelson merged commit 4949c07 into MFlowCode:master May 21, 2025
38 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants